<?php

namespace app\recharge\model;

use think\Model;

class Secret extends Model
{

    //数据库连接配置
    protected $connection = 'db_config_dragon';

    //重写父类的初始化方法initialize()
    protected function initialize()
    {

        //继承父类initialize()
        parent::initialize();

        //初始化数据表名称
        $this->table = 'secret';
    }

    public static function getSecret($app_id)
    {
        $record = Secret::getByApp_id($app_id);
        return $record->app_secret;
    }
}
